package com.aishua.andpaydemo.activity;

import android.os.Build;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.aishua.andpaydemo.ImageloaderHelper;
import com.aishua.andpaydemo.R;

/**
 * Created by aishua on 2018/5/18.
 */

public class FujinShopAcitivity extends BaseActivity implements View.OnClickListener {

    private ImageView img_title_xiaoxi;
    private ImageView img_shosuo;
    private ImageView img_map;
    private ImageView img_quanbufenlei;
    private ImageView damaichang;
    private TextView tv_title;
    private TextView tv_setting;

    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_fujinshop);

        initTitleView();
        initView();
    }

    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    private void initTitleView() {

        img_title_xiaoxi = findViewById(R.id.img_title_xiaoxi);
        tv_title = findViewById(R.id.tv_title);
        tv_setting = findViewById(R.id.tv_setting);

        tv_title.setText("附近商场");
        tv_setting.setVisibility(View.INVISIBLE);
        img_title_xiaoxi.setBackground(getDrawable(R.drawable.back));
        img_title_xiaoxi.setOnClickListener(this);

    }

    private void initView() {

        img_shosuo = findViewById(R.id.img_shosuo);
        img_map = findViewById(R.id.img_map);
        img_quanbufenlei = findViewById(R.id.img_quanbufenlei);
        damaichang = findViewById(R.id.damaichang);
        ImageloaderHelper.dispalyImage(this,R.drawable.shosuo,img_shosuo);
        ImageloaderHelper.dispalyImage(this,R.drawable.map,img_map);
        ImageloaderHelper.dispalyImage(this,R.drawable.quanbufenlei,img_quanbufenlei);
        ImageloaderHelper.dispalyImage(this,R.drawable.damaichang,damaichang);

    }


    @Override
    public void onClick(View v) {

        switch (v.getId()) {

            case R.id.img_title_xiaoxi:

                finish();

                break;
        }
    }
}
